#include "logger.hpp"

namespace hms::log
{

void printSection(
	log::logger& logger, std::string_view section, hms::log::Level level
){
	logger.log(level,
		"\n{}",
		fmt::format( fmt::emphasis::bold,
		"{0:─^{2}}\n"
		"{1: ^{2}}\n"
		"{0:─^{2}}\n", "", section, 80 )
	);
}

void printSection(
	const std::shared_ptr<spdlog::logger>& logger,
	std::string_view section,
	hms::log::Level level
){
	assert(logger);
	printSection( *logger, section, level );
}

} // namespace hms::log
